\hypertarget{classmodel_1_1_session_1_1_session_management}{
\section{model.Session.SessionManagement Class Reference}
\label{classmodel_1_1_session_1_1_session_management}\index{model::Session::SessionManagement@{model::Session::SessionManagement}}
}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a566c59ddabb10a724bd0cb810320934c}{reStartSession}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_af3a442e22463ef219f0330809446445e}{startSession}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_ab9f88a2c359ba2e8bdada7ff63bfe34a}{findSession}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a8fd96628f0ddc0a7ef45e51c29eb1126}{checkSession}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a044402fac329ba44825c4c07f9336fa8}{getUserSession}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a339290a2e8df93a16b532645dd69ad16}{gc}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a16c841aec38150c8a42d2353ffc17db4}{saveCurrentSession}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a8e20f3dfd4ba5a26e8bd387915954d98}{generateSessionID}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a104e932d462630275e51b8aff57fc5af}{generateKey}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a53505cad6ecd50490d1e085e1cdf1983}{checkSessionID}
\item 
def \hyperlink{classmodel_1_1_session_1_1_session_management_a8b3c5e8af4c055bd98460b871b392a7b}{retrieveUser}
\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_a0cc3decb55422951cbccd2695556d705}{startSession} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_a0cc3decb55422951cbccd2695556d705}{startSession})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_a1b2cecff2a61c390fcab73bbda0053e3}{findSession} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_a1b2cecff2a61c390fcab73bbda0053e3}{findSession})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_a37bead3512e0e32623d86f53400643f9}{checkSession} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_a37bead3512e0e32623d86f53400643f9}{checkSession})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_afeb1ef434cf2bdeef89a1473935b739b}{getUserSession} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_afeb1ef434cf2bdeef89a1473935b739b}{getUserSession})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_a200fe2b4db29dbe5e72b82c91e57af7c}{gc} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_a200fe2b4db29dbe5e72b82c91e57af7c}{gc})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_a33f889ccc79980c111be7e0a7bf39d10}{generateSessionID} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_a33f889ccc79980c111be7e0a7bf39d10}{generateSessionID})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_aa3a8b6eb650c668aa6d28c7a8665ec12}{generateKey} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_aa3a8b6eb650c668aa6d28c7a8665ec12}{generateKey})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_a1a9649b17a3685482d16f314cb212952}{checkSessionID} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_a1a9649b17a3685482d16f314cb212952}{checkSessionID})
\item 
tuple \hyperlink{classmodel_1_1_session_1_1_session_management_ae689008856bd1e501086a54e9a8c0dfb}{retrieveUser} = staticmethod(\hyperlink{classmodel_1_1_session_1_1_session_management_ae689008856bd1e501086a54e9a8c0dfb}{retrieveUser})
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\begin{DoxyVerb}Session management for incoming connexions (server side)
    Inclused Session and UserPrefs - rely on external user management (google)

      Usage : 
            id=SessionManagement.startSession(user)  # id is the sid to display
            newID=SessionManagement.checkSession(id,user) # id is the id gotten from the url, newid is the new sid to display
            SessionManagement.endSession(newID)

      Factory model allows the server to know every ongoing session
      Factory : the sessionFactoryobject retain all session in DB

      Session.startSession() : create sessionFactory if not existing, generate a session, stores it
      Session.checkSession(id) : check timeouts

      TODO : Current, last : each transaction has a different session ID
      next session ID is provide to the client: sequence and timestamp
      timestamp in session hash allow to void session stealing

\end{DoxyVerb}
 

Definition at line 190 of file Session.py.

\subsection{Member Function Documentation}
\hypertarget{classmodel_1_1_session_1_1_session_management_a8fd96628f0ddc0a7ef45e51c29eb1126}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!checkSession@{checkSession}}
\index{checkSession@{checkSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{checkSession}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.checkSession} ( {\em id})}}
\label{classmodel_1_1_session_1_1_session_management_a8fd96628f0ddc0a7ef45e51c29eb1126}
\begin{DoxyVerb}main function for non starting page\end{DoxyVerb}
 

Definition at line 264 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a53505cad6ecd50490d1e085e1cdf1983}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!checkSessionID@{checkSessionID}}
\index{checkSessionID@{checkSessionID}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{checkSessionID}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.checkSessionID} ( {\em ID})}}
\label{classmodel_1_1_session_1_1_session_management_a53505cad6ecd50490d1e085e1cdf1983}
\begin{DoxyVerb}
try to create a new session if it doesnt exist with the ID
\end{DoxyVerb}
 

Definition at line 358 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_ab9f88a2c359ba2e8bdada7ff63bfe34a}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!findSession@{findSession}}
\index{findSession@{findSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{findSession}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.findSession} ( {\em id})}}
\label{classmodel_1_1_session_1_1_session_management_ab9f88a2c359ba2e8bdada7ff63bfe34a}
\begin{DoxyVerb}id is id passed to client, not ID; ID is primary ID for table and a session is easilly found in __ALL__ by ID
\end{DoxyVerb}
 

Definition at line 244 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a339290a2e8df93a16b532645dd69ad16}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!gc@{gc}}
\index{gc@{gc}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{gc}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.gc} ()}}
\label{classmodel_1_1_session_1_1_session_management_a339290a2e8df93a16b532645dd69ad16}


Definition at line 326 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a104e932d462630275e51b8aff57fc5af}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!generateKey@{generateKey}}
\index{generateKey@{generateKey}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{generateKey}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.generateKey} ()}}
\label{classmodel_1_1_session_1_1_session_management_a104e932d462630275e51b8aff57fc5af}
\begin{DoxyVerb}generate a ID not already generated: ensure transaction\end{DoxyVerb}
 

Definition at line 348 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a8e20f3dfd4ba5a26e8bd387915954d98}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!generateSessionID@{generateSessionID}}
\index{generateSessionID@{generateSessionID}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{generateSessionID}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.generateSessionID} ( {\em len} = {\ttfamily {\bf DEF\_\-SESSIONID\_\-LEN}}, \/   {\em maxl} = {\ttfamily None})}}
\label{classmodel_1_1_session_1_1_session_management_a8e20f3dfd4ba5a26e8bd387915954d98}


Definition at line 339 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a044402fac329ba44825c4c07f9336fa8}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!getUserSession@{getUserSession}}
\index{getUserSession@{getUserSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{getUserSession}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.getUserSession} ( {\em user})}}
\label{classmodel_1_1_session_1_1_session_management_a044402fac329ba44825c4c07f9336fa8}
\begin{DoxyVerb}retrieve the session associated with the user
    user always exists
\end{DoxyVerb}
 

Definition at line 284 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a566c59ddabb10a724bd0cb810320934c}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!reStartSession@{reStartSession}}
\index{reStartSession@{reStartSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{reStartSession}]{\setlength{\rightskip}{0pt plus 5cm}def model.Session.SessionManagement.reStartSession ( {\em self}, \/   {\em session}, \/   {\em user})}}
\label{classmodel_1_1_session_1_1_session_management_a566c59ddabb10a724bd0cb810320934c}
\begin{DoxyVerb}assign a user to a session\end{DoxyVerb}
 

Definition at line 211 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a8b3c5e8af4c055bd98460b871b392a7b}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!retrieveUser@{retrieveUser}}
\index{retrieveUser@{retrieveUser}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{retrieveUser}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.retrieveUser} ( {\em user})}}
\label{classmodel_1_1_session_1_1_session_management_a8b3c5e8af4c055bd98460b871b392a7b}


Definition at line 373 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a16c841aec38150c8a42d2353ffc17db4}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!saveCurrentSession@{saveCurrentSession}}
\index{saveCurrentSession@{saveCurrentSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{saveCurrentSession}]{\setlength{\rightskip}{0pt plus 5cm}def model.Session.SessionManagement.saveCurrentSession ( {\em session} = {\ttfamily None})}}
\label{classmodel_1_1_session_1_1_session_management_a16c841aec38150c8a42d2353ffc17db4}


Definition at line 334 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_af3a442e22463ef219f0330809446445e}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!startSession@{startSession}}
\index{startSession@{startSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{startSession}]{\setlength{\rightskip}{0pt plus 5cm}def {\bf model.Session.SessionManagement.startSession} ( {\em user} = {\ttfamily None})}}
\label{classmodel_1_1_session_1_1_session_management_af3a442e22463ef219f0330809446445e}
\begin{DoxyVerb}create a new Session object and return the ID\end{DoxyVerb}
 

Definition at line 215 of file Session.py.

\subsection{Member Data Documentation}
\hypertarget{classmodel_1_1_session_1_1_session_management_a37bead3512e0e32623d86f53400643f9}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!checkSession@{checkSession}}
\index{checkSession@{checkSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{checkSession}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.checkSession} = staticmethod({\bf checkSession})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_a37bead3512e0e32623d86f53400643f9}


Definition at line 282 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a1a9649b17a3685482d16f314cb212952}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!checkSessionID@{checkSessionID}}
\index{checkSessionID@{checkSessionID}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{checkSessionID}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.checkSessionID} = staticmethod({\bf checkSessionID})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_a1a9649b17a3685482d16f314cb212952}


Definition at line 371 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a1b2cecff2a61c390fcab73bbda0053e3}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!findSession@{findSession}}
\index{findSession@{findSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{findSession}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.findSession} = staticmethod({\bf findSession})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_a1b2cecff2a61c390fcab73bbda0053e3}


Definition at line 262 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a200fe2b4db29dbe5e72b82c91e57af7c}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!gc@{gc}}
\index{gc@{gc}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{gc}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.gc} = staticmethod({\bf gc})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_a200fe2b4db29dbe5e72b82c91e57af7c}


Definition at line 331 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_aa3a8b6eb650c668aa6d28c7a8665ec12}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!generateKey@{generateKey}}
\index{generateKey@{generateKey}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{generateKey}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.generateKey} = staticmethod({\bf generateKey})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_aa3a8b6eb650c668aa6d28c7a8665ec12}


Definition at line 356 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a33f889ccc79980c111be7e0a7bf39d10}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!generateSessionID@{generateSessionID}}
\index{generateSessionID@{generateSessionID}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{generateSessionID}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.generateSessionID} = staticmethod({\bf generateSessionID})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_a33f889ccc79980c111be7e0a7bf39d10}


Definition at line 346 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_afeb1ef434cf2bdeef89a1473935b739b}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!getUserSession@{getUserSession}}
\index{getUserSession@{getUserSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{getUserSession}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.getUserSession} = staticmethod({\bf getUserSession})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_afeb1ef434cf2bdeef89a1473935b739b}


Definition at line 324 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_ae689008856bd1e501086a54e9a8c0dfb}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!retrieveUser@{retrieveUser}}
\index{retrieveUser@{retrieveUser}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{retrieveUser}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.retrieveUser} = staticmethod({\bf retrieveUser})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_ae689008856bd1e501086a54e9a8c0dfb}


Definition at line 377 of file Session.py.\hypertarget{classmodel_1_1_session_1_1_session_management_a0cc3decb55422951cbccd2695556d705}{
\index{model::Session::SessionManagement@{model::Session::SessionManagement}!startSession@{startSession}}
\index{startSession@{startSession}!model::Session::SessionManagement@{model::Session::SessionManagement}}
\subsubsection[{startSession}]{\setlength{\rightskip}{0pt plus 5cm}tuple {\bf model.Session.SessionManagement.startSession} = staticmethod({\bf startSession})\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classmodel_1_1_session_1_1_session_management_a0cc3decb55422951cbccd2695556d705}


Definition at line 242 of file Session.py.

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
pysrc/model/\hyperlink{model_2_session_8py}{Session.py}\end{DoxyCompactItemize}
